import * as m_types from '../mutation-types';

export default {
	state () {
		return {
			data: null,
			currentVideo: null,
			currentFloor: null,
			currentCompany: null,
			active: false,
			userName:null
		};
	},
	mutations: {
		[m_types.SET_DATA] (state, data) {
			state.data = data;
		},
		[m_types.INSERT_PERSON] (state, data) {
			state.data.list[state.data.list.length] = data;
		},
		[m_types.SET_CURRENT_VIDEO] (state, data) {
			state.currentVideo = data;
		},
		[m_types.SET_CURRENT_FLOOR] (state, data) {
			state.currentFloor = data;
		},
		[m_types.SET_CURRENT_COMPANY] (state, data) {
			state.currentCompany = data;
		},
		[m_types.SET_ACTIVE] (state, data) {
			state.active = data;
		},
		[m_types.SET_USER_NAME] (state, data) {
			state.userName = data;
		},
	}
};